package com.pro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pro.utils.DateUtil;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Array;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * ClassName:JsUser
 * Package:com.pro.pojo
 * Description: 用户pojo
 *
 * @Date:2021/11/3 上午 11:23
 * @Author:太宰
 */
public class JsUser implements Serializable {
    private Integer userId;//自增主键
    private String trueName;//用户真实姓名
    private String sex;//用户性别
    private String account;//用户账号唯一
    private String acatarUrl;//头像url路径
    private String email;//邮箱地址
    private String password;//密码
    private String remark;//备注
    private Integer enabled;//是否启用，1yes，2no
    private String phone;//手机号
    private String idCard;//身份证号码
    private String roleName;//角色名称
    private String courseName; //课程名称
    private String courseIntro;//课程简介

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birthDate;//出生日期

    private Integer dept_id;//部门id，外键
    private String freestyle;//个性签名

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registerDate;//注册时间
    private String registerDatee;
    private String registerIp;//注册时ip地址
    private Integer status;//状态，1使用中，2已注销，3冻结，4封停
    private Integer grade;//等级
    private Long wages;//工资

    private Integer deptId; //部门id
    private String deptName;//部门名称
    private String loginAddress;//登陆地址
    private String loginIp;//登录ip
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loginDate;//登陆时间

    private String tr_name; //权限名称
    private Integer authorityId;    //权限id
    private Integer[] authorityIdd;
    private Integer createId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;
    private Integer type;
    private String unsealDate;
    private String endDate;
    public JsUser() {
        super();
    }

    public JsUser(Integer userId, String trueName, String sex, String account, String acatarUrl, String email, String password, String remark, Integer enabled, String phone, String idCard, String roleName, String courseName, String courseIntro, Date birthDate, Integer dept_id, String freestyle, Date registerDate, String registerIp, Integer status, Integer grade, Long wages, Integer deptId, String deptName, String loginAddress, String loginIp, Date loginDate, String tr_name, Integer authorityId, Integer[] authorityIdd, Integer createId, Date createDate, Integer type, String unsealDate) {
        this.userId = userId;
        this.trueName = trueName;
        this.sex = sex;
        this.account = account;
        this.acatarUrl = acatarUrl;
        this.email = email;
        this.password = password;
        this.remark = remark;
        this.enabled = enabled;
        this.phone = phone;
        this.idCard = idCard;
        this.roleName = roleName;
        this.courseName = courseName;
        this.courseIntro = courseIntro;
        this.birthDate = birthDate;
        this.dept_id = dept_id;
        this.freestyle = freestyle;
        this.registerDate = registerDate;
        this.registerIp = registerIp;
        this.status = status;
        this.grade = grade;
        this.wages = wages;
        this.deptId = deptId;
        this.deptName = deptName;
        this.loginAddress = loginAddress;
        this.loginIp = loginIp;
        this.loginDate = loginDate;
        this.tr_name = tr_name;
        this.authorityId = authorityId;
        this.authorityIdd = authorityIdd;
        this.createId = createId;
        this.createDate = createDate;
        this.type = type;
        this.unsealDate = unsealDate;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getAcatarUrl() {
        return acatarUrl;
    }

    public void setAcatarUrl(String acatarUrl) {
        this.acatarUrl = acatarUrl;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseIntro() {
        return courseIntro;
    }

    public void setCourseIntro(String courseIntro) {
        this.courseIntro = courseIntro;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public Integer getDept_id() {
        return dept_id;
    }

    public void setDept_id(Integer dept_id) {
        this.dept_id = dept_id;
    }

    public String getFreestyle() {
        return freestyle;
    }

    public void setFreestyle(String freestyle) {
        this.freestyle = freestyle;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public String getRegisterIp() {
        return registerIp;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getGrade() {
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public Long getWages() {
        return wages;
    }

    public void setWages(Long wages) {
        this.wages = wages;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getLoginAddress() {
        return loginAddress;
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    public String getTr_name() {
        return tr_name;
    }

    public void setTr_name(String tr_name) {
        this.tr_name = tr_name;
    }

    public Integer getAuthorityId() {
        return authorityId;
    }

    public void setAuthorityId(Integer authorityId) {
        this.authorityId = authorityId;
    }

    public Integer[] getAuthorityIdd() {
        return authorityIdd;
    }

    public void setAuthorityIdd(Integer[] authorityIdd) {
        this.authorityIdd = authorityIdd;
    }

    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getUnsealDate() {
        return unsealDate;
    }

    public void setUnsealDate(String unsealDate) {
        this.unsealDate = unsealDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    @Override
    public String toString() {
        return "JsUser{" +
                "userId=" + userId +
                ", trueName='" + trueName + '\'' +
                ", sex='" + sex + '\'' +
                ", account='" + account + '\'' +
                ", acatarUrl='" + acatarUrl + '\'' +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", remark='" + remark + '\'' +
                ", enabled=" + enabled +
                ", phone='" + phone + '\'' +
                ", idCard='" + idCard + '\'' +
                ", roleName='" + roleName + '\'' +
                ", courseName='" + courseName + '\'' +
                ", courseIntro='" + courseIntro + '\'' +
                ", birthDate=" + birthDate +
                ", dept_id=" + dept_id +
                ", freestyle='" + freestyle + '\'' +
                ", registerDate=" + registerDate +
                ", registerIp='" + registerIp + '\'' +
                ", status=" + status +
                ", grade=" + grade +
                ", wages=" + wages +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", loginAddress='" + loginAddress + '\'' +
                ", loginIp='" + loginIp + '\'' +
                ", loginDate=" + loginDate +
                ", tr_name='" + tr_name + '\'' +
                ", authorityId=" + authorityId +
                ", authorityIdd=" + Arrays.toString(authorityIdd) +
                ", createId=" + createId +
                ", createDate=" + createDate +
                ", type=" + type +
                ", unsealDate=" + unsealDate +
                '}';
    }
}
